from django.db import models

# Create your models here.
'''
    Role:权限表
         roleName：角色名   
'''
class Role(models.Model):
    roleName=models.CharField(max_length=2)
    class Meta:
        db_table='Role'
'''
    User:用户表
         username：用户名
         password：密码
         email：邮箱
         isDelete：是否删除
         staffs：员工id
         roles：角色id 
'''
class User(models.Model):
    username=models.CharField(max_length=20)
    password=models.CharField(max_length=64)
    email=models.EmailField()
    isDelete=models.BooleanField(default=False)
    staffs=models.ForeignKey(Staff, on_delete=models.CASCADE)
    roles=models.ForeignKey(Role,on_delete=models.CASCADE)
    class Meta:
        db_table='User'

